package observer;

public class People implements ObserverHeart {
	private String name;
	private Heart heart;

	public void die() {
		System.out.println("the people die");
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Heart getHeart() {
		if (heart == null) {
			heart = new Heart();
		}
		return heart;
	}

	public void setHeart(Heart heart) {
		this.heart = heart;
	}

	@Override
	public void killPeople() {
		die();
	}
}
